package model

import "gorm.io/gorm"

// User 用户模型类
type User struct {
	gorm.Model        // 包含ID, CreatedAt, UpdatedAt, DeletedAt
	Username   string `gorm:"size:50;not null;unique"`
	Password   string `gorm:"size:255;not null"`
	Email      string `gorm:"size:255;not null;unique"`
	Phone      string `gorm:"size:11;not null;unique"`
}

// TableName 设置迁移到库后的名称
func (User) TableName() string {
	return "user"
}
